package com.graphics;

import com.utils.MapFileFilter;
import java.io.File;
import java.util.ArrayList;
import mapgenerator.Main;

/**
 *
 * @author Sajarwo Anggai
 */
public class ImageIdentity {

    private ArrayList images;
    private int rows;
    private int cols;
    private String name;
    private boolean sprite;

    public ImageIdentity(Main comp, String imageName, int rows, int cols) {
        this.rows = rows;
        this.cols = cols;
        this.name = imageName;
        File file = new File(comp.project.getImageDir()+File.separator+imageName);
        ImageManager im = new ImageManager(comp.project.getImageDir());
        im.loadStripImages(file.getName(), cols, rows);
        images = im.getImages(MapFileFilter.getPrefix(file.getName()));
    }

    public int getRows() {
        return rows;
    }

    public int getCols() {
        return cols;
    }

    public ArrayList getImages() {
        return images;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String toString() {
        return name;
    }

    public void setSprite(boolean sprite) {
        this.sprite = sprite;
    }

    
    public boolean isSprite() {
        return sprite;
    }

}
